# Maintainer:
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>

pkgname=libcddb
pkgver=1.3.2
pkgrel=7
arch=('x86_64')
pkgdesc="Library that implements the different protocols (CDDBP, HTTP, SMTP) to access data on a CDDB server (https://gnudb.org)"
url="https://sourceforge.net/projects/libcddb/"
license=('LGPL')
depends=('glibc')
source=("https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
        switch-default-server-to-gnudb.org.patch)
sha256sums=('35ce0ee1741ea38def304ddfe84a958901413aa829698357f0bee5bb8f0a223b'
            '3ee8610efa71322adb9095405da11b56386ac2c5825f976a84410c6270e59149')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -Np1 -i ../switch-default-server-to-gnudb.org.patch
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
